﻿//-----------------------------------------------------------------------
// <copyright file="TeamFoundationServerDataContractUnitTest.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics.Contracts
{
    using System;

    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// <summary>
    /// Provides unit tests for the <see cref="T:CodePlex.Diagnostics.Contracts.TeamFoundationServerDataContract"/> class.
    /// </summary>
    [TestClass]
    public sealed class TeamFoundationServerDataContractUnitTest
    {
        #region public TeamFoundationServerDataContractUnitTest()

        /// <summary>
        /// Initializes a new instance of the <see cref="T:TeamFoundationServerDataContractUnitTest"/> class.
        /// </summary>
        public TeamFoundationServerDataContractUnitTest()
        {
        }

        #endregion

        #region public TestContext TestContext

        /// <summary>
        /// Gets or sets the test context which provides information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext
        {
            get;
            set;
        }

        #endregion

        #region public void TeamFoundationServerDataContractConstructorUnitTest()

        /// <summary>
        /// Ensures that the constructor of the <see cref="T:CodePlex.Diagnostics.Contracts.TeamFoundationServerDataContract"/> class is correctly copying the values from the supplied <see cref="T:System.TeamFoundationServer"/> instance.
        /// </summary>
        [TestMethod]
        public void TeamFoundationServerDataContractConstructorUnitTest()
        {
            // establish a Uri for the server instance.
            Uri uri = new Uri(@"https://tfs06.codeplex.com");

            // establish a new instance of the TeamFoundationServerDataContract class.
            TeamFoundationServerDataContract tfs = new TeamFoundationServerDataContract(uri);

            // TODO: complete unit test for TeamFoundationServerDataContract class.

            // ensure the team foundation server data contract successfully constructed.
            Assert.IsNotNull(tfs);
        }

        #endregion
    }
}